<?php
/**
 * XuYuan Project
 *
 * @package	XueYuan 
 * @author	Jiuchi Team
 * @since	Version 1.0.0
 * @filesource
 */
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * Login view
 * @author Wayne Yu
 */
?>
        <div class="xywrap topinner">
            <span class="top-link-logo">学园</span>
            <div class="topsearch">
                <form action="<?php echo site_url('topic/search')?>" class="top-search-form" method="get" id="formID">
                    <input type="text" class="top-search-input" id="keyword" name="keyword" autocomplete="off" value="" placeholder="搜索感兴趣的话题" /><i class="icon-search iconfont" id="link-search">&#xe674;</i>
                </form>
            </div>
            <div class="navcontent" id="">
                <ul>
                    <li>
                        <a href="<?php echo site_url('home/msg')?>" class="topnavx">消息</a>
                    </li>
                    <li>
                    	<a href="<?php echo site_url('circle')?>" class="topnavx">圈子</a>
                    </li>
                    <li>
                    	<a href="<?php echo site_url('home/dynamic')?>" class="topnavx">动态</a>
                    </li>
                </ul>
            </div>
            <div class="top-nav-selfinfo">
                <div class="top-nav-userinfo" id="btn-my">
                    <span class="name"><?php echo $this->session->userdata('nickname')?></span>
                    <img src="<?php echo $this->session->userdata('avatar')?>" class="avatar">
                </div>
                <ul class="top-nav-dropdown" id="">
                    <li>
                        <a href="<?php echo site_url('mycenter')?>">个人主页</a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('mycenter/settings')?>">设置</a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('login/logout')?>">退出</a>
                    </li>
                </ul>
            </div>
        </div>
            <script>
    $(document).ready(function() {
        $('#link-search').click(function () {
            if($('#keyword').val()==''){
                return false;
            }
            $('#formID').submit(); 
        });
        $('#myNoticeTab button').click(function() {
            $(this).children().addClass("active").parent().siblings().children().removeClass("active");
            $(".navmessage-content-inner").hide().eq($('#myNoticeTab button').index(this)).show();
            return false;
        });
        $('#btn-my').hover(function () {
            $('#btn-my>div').addClass("active")
        },function () {
            $('#btn-my>div').removeClass("active")
        });
    });
    </script>